<?php
namespace app\common\logic;

use think\Model;


class Draw extends Model
{

    public function change($data = [])
    {
        return $this->saveAll($data);
    }


    public function getNameAttr($value,$data)
    {
        if ($data['type'] == 1){
            return getGiftName($data['key']);
        }else{
            return $value;
        }
    }

}